home *** CD-ROM | disk | FTP | other *** search
- ## -*-Tcl-*-
- # ==========================================================================
- # Help files for Alpha
- #
- # FILE: "HTML Help.tcl"
- # created: 10/17/00 {02:18:43 pm}
- # last update: 11/30/00 {08:44:51 pm}
- # Description:
- #
- # Script to view the local HTML .html manual, either in one's web browser
- # or using Alpha's parser. This script does not assume that HTML mode
- # has been loaded, or that the variable "manualFolder" is available.
- #
- # Author: Craig Barton Upright
- # E-mail: <cupright@princeton.edu>
- # mail: Princeton University, Department of Sociology
- # Princeton, New Jersey 08544
- # www: <http://www.princeton.edu/~cupright>
- #
- # ==========================================================================
- ##
-
- catch {unset option}
-
- set helpDir [file join $HOME "HTML mode manual"]
- set helpIntro [file join $HOME Help "HTML Help"]
-
- # Is the "HTML manual" properly installed?
- if {![file isdirectory $helpDir]} {
- if {[file isfile $helpIntro]} {
- help::openDirect $helpIntro
- } else {
- alertnote "The HTML Help file documents are not properly installed."
- }
- unset helpDir helpIntro
- return
- }
-
- # If "helpMenuOptions" is not 0, then the user wants to view the .html
- # manual. (If the preference is 2 there could be more options, but there
- # is no .pdf help file yet.)
-
- if {$helpMenuOptions == 0} {
- set options [list \
- "Open HTML Help introduction" \
- "View .html version of manual" \
- "Open manual's .html file in HTML mode" \
- "(Set WWW preferences to avoid this dialog …)" \
- ]
- } elseif {$helpMenuOptions == 1 || $helpMenuOptions == 2} {
- set option "View .html version of manual" \
- }
-
- if {![info exists option]} {
- # We still have options.
- set option [listpick \
- -p "HTML manual options …" \
- -L "View .html version of manual" $options]
- }
-
- if {$option == "(Set WWW preferences to avoid this dialog …)"} {
- dialog::preferences preferences "WWW"
- helpMenu "HTML Help"
- } elseif {$option == "Open HTML Help introduction"} {
- help::openDirect $helpIntro
- } elseif {$option == "View .html version of manual"} {
- help::openDirect [file join $helpDir HTMLmanual.html]
- } elseif {$option == "Open manual's .html file in HTML mode"} {
- edit -r -c [file join $helpDir HTMLmanual.html]
- }
-
- unset helpDir helpIntro
- catch {
- unset options
- unset option
- }
-